home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / LITTLE / P3SRC.ZIP / ATARI / MATRICES.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-07  |  3.8 KB  |  86 lines

  1. /****************************************************************************
  2. *                   matrices.h
  3. *
  4. *  This module contains all defines, typedefs, and prototypes for MATRICES.C.
  5. *
  6. *  from Persistence of Vision(tm) Ray Tracer
  7. *  Copyright 1996 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *  NOTICE: This source code file is provided so that users may experiment
  10. *  with enhancements to POV-Ray and to port the software to platforms other
  11. *  than those supported by the POV-Ray Team.  There are strict rules under
  12. *  which you are permitted to use this file.  The rules are in the file
  13. *  named POVLEGAL.DOC which should be distributed with this file. If
  14. *  POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. *  Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  16. *  Forum.  The latest version of POV-Ray may be found there as well.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23.  
  24.  
  25. #ifndef MATRICES_H
  26. #define MATRICES_H
  27.  
  28.  
  29.  
  30. /*****************************************************************************
  31. * Global preprocessor defines
  32. ******************************************************************************/
  33.  
  34.  
  35.  
  36.  
  37. /*****************************************************************************
  38. * Global typedefs
  39. ******************************************************************************/
  40.  
  41.  
  42.  
  43.  
  44. /*****************************************************************************
  45. * Global variables
  46. ******************************************************************************/
  47.  
  48.  
  49.  
  50.  
  51. /*****************************************************************************
  52. * Global functions
  53. ******************************************************************************/
  54.  
  55. void MZero PARAMS((MATRIX result));
  56. void MIdentity PARAMS((MATRIX result));
  57. void MTimes PARAMS((MATRIX result, MATRIX matrix1, MATRIX matrix2));
  58. void MAdd PARAMS((MATRIX result, MATRIX matrix1, MATRIX matrix2));
  59. void MSub PARAMS((MATRIX result, MATRIX matrix1, MATRIX matrix2));
  60. void MScale PARAMS((MATRIX result, MATRIX matrix1, DBL amount));
  61. void MTranspose PARAMS((MATRIX result, MATRIX matrix1));
  62. void MTransPoint PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  63. void MInvTransPoint PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  64. void MTransDirection PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  65. void MInvTransDirection PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  66. void MTransNormal PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  67. void MInvTransNormal PARAMS((VECTOR result, VECTOR vector, TRANSFORM *trans));
  68. void Compute_Matrix_Transform PARAMS((TRANSFORM *result, MATRIX matrix));
  69. void Compute_Scaling_Transform PARAMS((TRANSFORM *result, VECTOR vector));
  70. void Compute_Inversion_Transform PARAMS((TRANSFORM *result));
  71. void Compute_Translation_Transform PARAMS((TRANSFORM *transform, VECTOR vector));
  72. void Compute_Rotation_Transform PARAMS((TRANSFORM *transform, VECTOR vector));
  73. void Compute_Look_At_Transform PARAMS((TRANSFORM *transform, VECTOR Look_At, VECTOR Up, VECTOR Right));
  74. void Compose_Transforms PARAMS((TRANSFORM *Original_Transform, TRANSFORM *New_Transform));
  75. void Compute_Axis_Rotation_Transform PARAMS((TRANSFORM *transform, VECTOR V1, DBL angle));
  76. void Compute_Coordinate_Transform PARAMS((TRANSFORM *trans, VECTOR origin, VECTOR up, DBL r, DBL len));
  77. TRANSFORM *Create_Transform PARAMS((void));
  78. TRANSFORM *Copy_Transform PARAMS((TRANSFORM *Old));
  79. VECTOR *Create_Vector PARAMS((void));
  80. DBL *Create_Float PARAMS((void));
  81. void MInvers PARAMS((MATRIX r, MATRIX m));
  82.  
  83.  
  84.  
  85. #endif
  86.